28 #ifndef _spoton_common_h_
29 #define _spoton_common_h_
37 #include <QStringList>
39 typedef QHash<QString, QByteArray> QStringByteArrayHash;
40 typedef QList<QByteArray> QByteArrayList;
41 typedef QList<QPair<QByteArray, qint64> > QPairByteArrayInt64List;
42 typedef QPair<QByteArray, QByteArray> QPairByteArrayByteArray;
47 static QList<int> LANE_WIDTHS;
48 static QString POSTGRESQL_CONNECTION_OPTIONS;
49 static QString SSL_CONTROL_STRING;
50 static QStringList ACCEPTABLE_URL_SCHEMES;
51 static QStringList SPOTON_ENCRYPTION_KEY_NAMES;
52 static QStringList SPOTON_SIGNATURE_KEY_NAMES;
53 static const int ACCOUNTS_RANDOM_BUFFER_SIZE = 64;
54 static const int BUZZ_MAXIMUM_ID_LENGTH = 256;
63 static const int BUZZ_TIME_DELTA = 30;
64 static const int CACHE_TIME_DELTA_MAXIMUM_STATIC = 30;
65 static const int CHAT_MAXIMUM_REPLAY_QUEUE_SIZE = 15;
66 static const int CHAT_TIME_DELTA_MAXIMUM_STATIC = 30;
67 static const int ELEGANT_STARBEAM_SIZE = 30000;
68 static const int EMAIL_ATTACHMENT_MAXIMUM_SIZE = 10 * 1024 * 1024;
69 static const int EPKS_TIME_DELTA = 30;
70 static const int FORWARD_SECRECY_TIME_DELTA_MAXIMUM_STATIC = 30;
71 static const int GEMINI_TIME_DELTA_MAXIMUM_STATIC = 90;
72 static const int HARVEST_POST_OFFICE_LETTERS_INTERVAL = 5;
73 static const int IDENTICAL_CREDENTIALS_ITERATIONS = 5;
74 static const int KERNEL_CERTIFICATE_DAYS_VALID = 7;
75 static const int KERNEL_URL_DISPATCHER_INTERVAL_STATIC = 60;
76 static const int LANE_WIDTH_DEFAULT = 5242880;
77 static const int LANE_WIDTH_MAXIMUM = 20971520;
78 static const int LANE_WIDTH_MINIMUM = 4096;
79 static const int LOG_FILE_MAXIMUM_SIZE = 8 * 1024 * 1024;
80 static const int MAIL_TIME_DELTA_MAXIMUM_STATIC = 90;
81 static const int MAXIMUM_ATTEMPTS_PER_POPTASTIC_POST = 2;
82 static const int MAXIMUM_COPY_KEY_SIZES = 10 * 1024 * 1024;
83 static const int MAXIMUM_DESCRIPTION_LENGTH_SEARCH_RESULTS = 500;
84 static const int MAXIMUM_KERNEL_GUI_SERVER_SINGLE_SOCKET_BUFFER_SIZE =
85 #ifdef SPOTON_MCELIECE_ENABLED
88 CHAR_BIT * 1024 * 1024;
90 static const int MAXIMUM_KERNEL_WEB_SERVER_SOCKET_READ_BUFFER_SIZE = 4096;
91 static const int MAXIMUM_PENDING_CONNECTIONS = USHRT_MAX;
92 static const int MAXIMUM_UDP_DATAGRAM_SIZE = 508;
93 static const int MINIMUM_SECURE_MEMORY_POOL_SIZE = 262144;
94 static const int MINIMUM_STARBEAM_PULSE_SIZE = 1024;
95 static const int MOSAIC_SIZE = 64;
96 static const int NAME_MAXIMUM_LENGTH = 64;
97 static const int NEIGHBOR_LIFETIME_MS = 10 * 60 * 1000;
98 static const int NEIGHBOR_SILENCE_TIME = 180;
99 static const int POPTASTIC_FORWARD_SECRECY_TIME_DELTA_MAXIMUM_STATIC = 60;
100 static const int POPTASTIC_GEMINI_TIME_DELTA_MAXIMUM_STATIC = 90;
101 static const int POPTASTIC_MAXIMUM_EMAIL_SIZE = 50 * 1024 * 1024;
102 static const int POPTASTIC_STATUS_INTERVAL = 60;
103 static const int REAP_POST_OFFICE_LETTERS_INTERVAL = 60;
104 static const int RSS_IMPORTS_PER_THREAD = 5;
105 static const int SEND_QUEUED_EMAIL_INTERVAL = 5;
106 static const int SMP_TIME_DELTA_MAXIMUM = 90;
107 static const int SPOTON_HOME_MAXIMUM_PATH_LENGTH = 256;
108 static const int STARBEAM_TIME_DELTA = 30;
109 static const int STATUS_INTERVAL = 15;
110 static const int STATUS_TEXT_MAXIMUM_LENGTH = 64;
111 static const int URL_CONTENT_SHARE_MAXIMUM_SIZE = 5 * 1024 * 1024;
112 static const int URL_TIME_DELTA = 30;
113 static const int WAIT_FOR_BYTES_WRITTEN_MSECS_MAXIMUM = 2500;
114 static const int WAIT_FOR_BYTES_WRITTEN_MSECS_PREFERRED = 250;
125 static const int WEB_SERVER_KEY_SIZE = 3072;
126 static const long int WEB_SERVER_CERTIFICATE_LIFETIME =
127 365L * 60L * 60L * 24L;
128 static const qint64 MAXIMUM_BLUETOOTH_PACKET_SIZE = 1000;
129 static const qint64 MAXIMUM_NEIGHBOR_BUFFER_SIZE =
130 static_cast<qint64
> (LANE_WIDTH_MAXIMUM);
134 static const qint64 MAXIMUM_NEIGHBOR_CONTENT_LENGTH =
135 MAXIMUM_NEIGHBOR_BUFFER_SIZE / 10;
136 static const qint64 MAXIMUM_SCTP_PACKET_SIZE = 500;
137 static const qint64 MAXIMUM_STARBEAM_PULSE_SIZE = 2500000;
138 static const qint64 MAXIMUM_TCP_PACKET_SIZE = 4096;
139 static const qint64 MINIMUM_NEIGHBOR_CONTENT_LENGTH = 256;
140 static const unsigned long int GEMINI_ITERATION_COUNT = 25000;
146 static int CACHE_TIME_DELTA_MAXIMUM;
147 static int CHAT_TIME_DELTA_MAXIMUM;
148 static int FORWARD_SECRECY_TIME_DELTA_MAXIMUM;
149 static int GEMINI_TIME_DELTA_MAXIMUM;
150 static int KERNEL_URL_DISPATCHER_INTERVAL;
151 static int MAIL_TIME_DELTA_MAXIMUM;
152 static int POPTASTIC_FORWARD_SECRECY_TIME_DELTA_MAXIMUM;
153 static int POPTASTIC_GEMINI_TIME_DELTA_MAXIMUM;